package com.cheng.feign;

import com.cheng.feign.feignCallback.ProviderFeignHandler;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient(value = "springcloud-provider",fallback = ProviderFeignHandler.class)
@Component
public interface ProviderFeign {

    @GetMapping("/provider/hello")
    String getHello();

    @RequestMapping("/provider/fallback")
    String getFallback(boolean flag);
}
